///###############
//FILE          : Data.java
//WRITER        : Lior Zimmerman, liorz06, 066462300
//WRITER        : Ohad Dan, ohad_dan, 036767960
//EXERCISE      : oop ex1 2008
//DESCRIPTION   : this class represents a simple data object that its sole
//                purpose is to return its key (used in the tester class)
//###############
package oop.ex1.sortedStructure;
/**
 * Data that will be held by sorted structure and can be keyed.
 */
class Data implements Keyed<Integer> {
    Integer _key;
    /**
     * Construct a new data.
     * @param key The key of the data.
     */
    public Data( Integer key ) {
        _key = key;
    }
    /**
     * Returns data's key.
     * @return key
     */
    public Integer getKey(){ 
        return _key;
    }   
    /**
     * Returns a string representation of data.
     * @return A string representation of data.
     */
    public String toString(){
        return _key+"";
    }
}
